<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/10/25
 * Time: 8:19
 */

class myException extends Exception{
    public function getALLInfo(){
        return"异常发生信息为：{$this -> getMessage()}";
    }
}

try{
    $x=new myException("有人给你发生错误啦!");
    throw $x;

    }catch (myException $e){
    echo 'e';
    echo $e->getALLInfo();
}